#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "fsmled.h"
#include "temprature.h"
#include <QtMqtt/QMqttClient>
#include <QTcpSocket>
#include <QTcpServer>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:

    void on_led1_btn_clicked();
    void on_led2_btn_clicked();
    void on_led3_btn_clicked();
    void on_led4_btn_clicked();
    void temp_show();
    void init_commodity_img();

    void init_mqtt_cli();
    void on_select1_clicked();

    void on_select2_clicked();

    void on_select3_clicked();

private:
    Ui::Widget *ui;
    fsmpLeds *leds;
    fsmpTempHum *tem;
    bool flag3[3];
    QMqttClient *mqtt_cli;
    QTcpSocket *tcp_client_socket;
    QTcpServer *tcp_server;
};
#endif // WIDGET_H
